package xyz.riceball.develop.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import xyz.riceball.framework.core.bean.ApiR;
import xyz.riceball.develop.service.CommonService;

import javax.annotation.Resource;
import java.util.Map;

/**
 * <p>
 * 内部api，负责转发信息的处理，不对外的
 * </p>
 *
 * @author xiaovcloud
 * @since 2022/6/30 23:38
 */
@Deprecated
@RestController
@RequestMapping("/rb/api/commonApi")
public class CommonController {

    public static String COMMAPI = "/rb/api/commonApi";
    public static String EXECUTEQUERY = COMMAPI + "/executeQuery";

    @Resource
    private CommonService commonService;

    /**
     * @return
     */
    @RequestMapping("/executeQuery")
    public ApiR executeQuery(Map<String, Object> params, String routeId) {
        return commonService.executeQuery(params, routeId);
    }
}
